import { IsInt } from 'class-validator';
import { Type } from 'class-transformer';

export class Paging {
  @Type(() => Number)
  @IsInt({
    message: JSON.stringify({ message: '页码必须为整形数字', code: 10101 }),
  })
  readonly pageNo: number;
  @Type(() => Number)
  @IsInt({
    message: JSON.stringify({ message: '条数必须为整形数字', code: 10101 }),
  })
  readonly pageSize: number;
}
